// pages/hotAction/hotAction.js
let app = getApp()
// 获取云数据库引用
const db = wx.cloud.database()
const nuc66 = db.collection('nuc__66')

Page({

  /**
   * 页面的初始数据
   */
  data: {
    showLAction: false,
    showFAction: true,
    lastActionArr: [],
    futureActionArr: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad (options) {
    let that = this
    // 获取近期活动
    nuc66.doc('b00064a760e2b0c425166dc37ddb33ad').get({
      success (res) {
        that.setData({
          lastActionArr: res.data.lastAction,
          futureActionArr: res.data.futureAction
        })
      }
    })
  },

  showLast () {
    this.setData({ showLAction: true, showFAction: false })
  },
  showFuture () {
    this.setData({ showLAction: false, showFAction: true })
  }
})